home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / M-Md / Magadex 1.0.cpt / Magadex 1.0 / card_3320.txt < prev    next >
Text File  |  1988-12-13  |  18KB  |  694 lines

  1. -- card: 3320 from stack: in.0
  2. -- bmap block id: 3712
  3. -- flags: 4000
  4. -- background id: 24903
  5. -- name: Contents
  6. ----- HyperTalk script -----
  7. on openCard
  8.   put the abbreviated date into card field "Date"
  9.   set icon of card button "Editor" to 27636
  10. end openCard
  11.  
  12. on idle
  13.   put the time into card field "Time"
  14. end idle
  15.  
  16. on closeCard
  17.   set icon of card button "Editor" to 27636
  18.   set the scroll of card field "Keyfield" to 0
  19.   if the visible of card field "Help" is true then
  20.     set lockscreen to true
  21.     hide card button "eyehelp"
  22.     hide card button "keyhelp"
  23.     hide card button "newcardhelp"
  24.     hide card field "Help"
  25.     set lockscreen to false
  26.   end if
  27. end closeCard
  28.  
  29.  
  30. -- part 4 (button)
  31. -- low flags: 00
  32. -- high flags: 2000
  33. -- rect: left=76 top=296 right=317 bottom=96
  34. -- title width / last selected line: 0
  35. -- icon id / first selected line: 26635 / 26635
  36. -- text alignment: 1
  37. -- font id: 0
  38. -- text size: 12
  39. -- style flags: 0
  40. -- line height: 16
  41. -- part name: Help
  42. ----- HyperTalk script -----
  43. on mouseUp
  44.   if visible of card field "Help" is true then
  45.     set lockscreen to true
  46.     hide card button "eyehelp"
  47.     hide card button "keyhelp"
  48.     hide card button "newcardhelp"
  49.     hide card field "Help"
  50.     set lockscreen to false
  51.     exit mouseUp
  52.   end if
  53.  
  54.   if visible of card field "Help" is false then
  55.     set lockscreen to true
  56.     show card field "Help"
  57.     show card button "eyehelp"
  58.     show card button "keyhelp"
  59.     show card button "newcardhelp"
  60.     set lockscreen to false
  61.   end if
  62. end mouseUp
  63.  
  64.  
  65.  
  66. -- part 6 (field)
  67. -- low flags: 00
  68. -- high flags: 2007
  69. -- rect: left=304 top=109 right=295 bottom=441
  70. -- title width / last selected line: 0
  71. -- icon id / first selected line: 0 / 0
  72. -- text alignment: 0
  73. -- font id: 3
  74. -- text size: 9
  75. -- style flags: 0
  76. -- line height: 12
  77. -- part name: Keyfield
  78.  
  79.  
  80. -- part 10 (button)
  81. -- low flags: 00
  82. -- high flags: 2000
  83. -- rect: left=172 top=295 right=316 bottom=200
  84. -- title width / last selected line: 0
  85. -- icon id / first selected line: 3430 / 3430
  86. -- text alignment: 1
  87. -- font id: 0
  88. -- text size: 12
  89. -- style flags: 0
  90. -- line height: 16
  91. -- part name: Add Card
  92. ----- HyperTalk script -----
  93. on mouseUp
  94.   if the commandkey is down then
  95.     push card
  96.     set the lockscreen to true
  97.     answer "How do you want to sort entries?" with "Author" or "Magazine" or "Cancel"
  98.     if it is "Cancel" then
  99.       pop card
  100.       set the lockscreen to false
  101.       exit mouseUp
  102.     end if
  103.     set the cursor to 4
  104.     if it is "Author" then sort by last word of field "Author"
  105.     else sort by first word of field "Magazine"
  106.     pop card
  107.     set the lockscreen to false
  108.     exit mouseUp
  109.   end if
  110.  
  111.   set the lockscreen to true
  112.   push card
  113.   go to last card of this stack
  114.   ask "How many new cards do you want?"
  115.   if it = "" then
  116.     pop card
  117.     exit mouseUp
  118.   end if
  119.  
  120.   repeat for it
  121.     doMenu "New Card"
  122.   end repeat
  123.   set the lockscreen to false
  124.   type tab
  125. end mouseUp
  126.  
  127.  
  128. -- part 21 (button)
  129. -- low flags: 00
  130. -- high flags: 2000
  131. -- rect: left=120 top=297 right=315 bottom=150
  132. -- title width / last selected line: 0
  133. -- icon id / first selected line: 1009 / 1009
  134. -- text alignment: 1
  135. -- font id: 0
  136. -- text size: 12
  137. -- style flags: 0
  138. -- line height: 16
  139. -- part name: Search
  140. ----- HyperTalk script -----
  141. on mouseUp
  142.   global theList
  143.  
  144.   -- get most recent title listing
  145.   if the shiftkey is down then
  146.     set the cursor to 4
  147.     DoList 999,theList,one
  148.     put the result into tempList
  149.     put item 2 of tempList into tempList
  150.     find tempList in field "Title"
  151.     click at 27,61
  152.     exit mouseUp
  153.   end if
  154.  
  155.   if the optionkey is down then
  156.     doMenu "Find..."
  157.     exit mouseUp
  158.   end if
  159.  
  160.   if the commandkey is down then
  161.     set the cursor to 4
  162.     put empty into theList
  163.     set the lockscreen to true
  164.     repeat for number of cards
  165.       go to next card
  166.       if field "Title" is not empty then
  167.         put line 1 of field "Title" into tempTitle
  168.         put tempTitle after theList
  169.         put "," after theList
  170.       end if
  171.     end repeat
  172.     DoList 999,theList,one
  173.     put the result into tempList
  174.     put item 2 of tempList into tempList
  175.     set the lockscreen to false
  176.     find tempList in field "Title"
  177.     click at 27,61
  178.     exit mouseUp
  179.   end if
  180.  
  181.   --Main handler
  182.   Answer "How do you want to view articles?" with "Keyword" or "Author" or "Cancel"
  183.   if it is "Cancel" then exit mouseUp
  184.  
  185.   if it is "Keyword" then
  186.     --find out which keyword(s) the user wants to view by
  187.     set the cursor to 4
  188.     put empty into theList
  189.     repeat with count=1 to the number of lines in card field "KeyField" in card "Contents"
  190.       get line count of card field "KeyField" in card "Contents"
  191.       put it after theList
  192.       put "," after theList
  193.     end repeat
  194.     --use James Paul's DoList XCMD
  195.     --allowing for a discontinuous selection
  196.     DoList "Select","Cancel",theList,dis
  197.     put the result into tempList
  198.     set the lockscreen to false
  199.     --save the number of keywords selected
  200.     put item 1 of tempList into numberOfWords
  201.     --strip the number from the string of keywords
  202.     delete item 1 of tempList
  203.     if tempList is empty then exit mouseUp
  204.  
  205.     if numberOfWords>1 then
  206.       answer "List entries with ALL or just ANY keywords?" with "ALL" or "ANY" or "Cancel"
  207.       if it is "Cancel" then exit mouseUp
  208.       if it is "Any" then
  209.         set the cursor to 4
  210.         set the lockscreen to true
  211.         put empty into theList
  212.         repeat with count = 1 to number of items in tempList
  213.           repeat for number of cards
  214.             go to next card
  215.             if item count in tempList is in field "Keywords" then
  216.               if line 1 of field "Title" is not in theList then
  217.                 put line 1 of field "Title" after theList
  218.                 put "," after theList
  219.               end if
  220.             end if
  221.           end repeat
  222.         end repeat
  223.         --put the list of titles in the extra wide dialog box
  224.         DoList 999,theList,one
  225.         put the result into tempList
  226.         put item 2 of tempList into tempList
  227.         find tempList in field "Title"
  228.         click at 27,61
  229.         exit mouseUp
  230.  
  231.       else if it is "ALL" then
  232.         set the cursor to 4
  233.         set the lockscreen to true
  234.         put empty into theList
  235.         repeat for number of cards
  236.           put 0 into flag
  237.           go to next card
  238.           repeat with count = 1 to number of items in tempList
  239.             if item count in tempList is not in field "Keywords" then
  240.               put 1 into flag
  241.               next repeat
  242.             end if
  243.           end repeat
  244.  
  245.           if flag = 0 then
  246.             if line 1 of field "Title" is not in theList then
  247.               put line 1 of field "Title" after theList
  248.               put "," after theList
  249.             end if
  250.           end if
  251.         end repeat
  252.         --put the list of titles in the extra wide dialog box
  253.         DoList 999,theList,one
  254.         put the result into tempList
  255.         put item 2 of tempList into tempList
  256.         find tempList in field "Title"
  257.         click at 27,61
  258.         exit mouseUp
  259.       end if
  260.     end if
  261.  
  262.     --only 1 keyword to find
  263.     set the cursor to 4
  264.     set the lockscreen to true
  265.     put empty into theList
  266.     repeat for number of cards
  267.       go to next card
  268.       if field "Keywords" is not empty then
  269.         if tempList is in field "Keywords" then
  270.           put line 1 of field "Title" after theList
  271.           put "," after theList
  272.         end if
  273.       end if
  274.     end repeat
  275.  
  276.     --put the list of titles in the wide dialog box
  277.     DoList 999,theList,one
  278.     put the result into tempList
  279.     put item 2 of tempList into tempList
  280.     find tempList in field "Title"
  281.     click at 27,61
  282.     exit mouseUp
  283.   end if
  284.  
  285.   --Alternatively, get a list of authors (without duplication)
  286.  
  287.   set the cursor to 4
  288.   push card
  289.   set the lockscreen to true
  290.   put empty into authorList
  291.   go to card 1
  292.   repeat for number of cards
  293.     go to next card
  294.     if field "Author" is not empty then
  295.       if line 1 of field "Author" is not in authorList then
  296.         put line 1 of field "Author" after authorList
  297.         put "," after authorList
  298.       end if
  299.     end if
  300.   end repeat
  301.  
  302.   -- select an author to view
  303.   DoList "Select","Cancel",authorList,one
  304.   put the result into tempList
  305.   put item 2 of tempList into tempList
  306.   if tempList is empty then
  307.     pop card
  308.     pop card
  309.     set the lockscreen to false
  310.     exit mouseUp
  311.   end if
  312.   --get a list of articles by selected author
  313.   set the cursor to 4
  314.   set the lockscreen to true
  315.   put empty into theList
  316.   repeat for number of cards
  317.     go to next card
  318.     if tempList is in field "Author" then
  319.       put line 1 of field "Title" after theList
  320.       put "," after theList
  321.     end if
  322.   end repeat
  323.  
  324.   --let the user select which article to go to
  325.   DoList 999,theList,one
  326.   put the result into tempList
  327.   put item 2 of tempList into tempList
  328.   if tempList is empty then exit mouseUp
  329.   set the lockscreen to false
  330.   find tempList in field "Title"
  331.   click at 27,61
  332.  
  333. end mouseUp
  334.  
  335.  
  336.  
  337. -- part 22 (button)
  338. -- low flags: 00
  339. -- high flags: 2000
  340. -- rect: left=273 top=91 right=107 bottom=350
  341. -- title width / last selected line: 0
  342. -- icon id / first selected line: 0 / 0
  343. -- text alignment: 1
  344. -- font id: 0
  345. -- text size: 12
  346. -- style flags: 0
  347. -- line height: 16
  348. -- part name: 
  349. ----- HyperTalk script -----
  350. on mouseUp
  351.   --alphabetize keywords
  352.   set the cursor to 4
  353.   put empty into theList
  354.   repeat with count=1 to the number of lines in card field "KeyField"
  355.     get line count of card field "KeyField"
  356.     put it after theList
  357.     put "," after theList
  358.   end repeat
  359.   --use Marvin Nielsen's SortItems XFCN to alphabetize
  360.   put SortItems (theList,true) into theList
  361.   --and Eric Celeste's Strip XFCN to remove commas
  362.   put Strip(",",theList) into card field "Keyfield"
  363.   set the scroll of card field "Keyfield" to 0
  364. end mouseUp
  365.  
  366.  
  367.  
  368. -- part 25 (field)
  369. -- low flags: 01
  370. -- high flags: 0000
  371. -- rect: left=33 top=77 right=91 bottom=158
  372. -- title width / last selected line: 0
  373. -- icon id / first selected line: 0 / 0
  374. -- text alignment: 0
  375. -- font id: 3
  376. -- text size: 9
  377. -- style flags: 0
  378. -- line height: 12
  379. -- part name: Date
  380.  
  381.  
  382. -- part 26 (field)
  383. -- low flags: 01
  384. -- high flags: 0000
  385. -- rect: left=188 top=77 right=92 bottom=254
  386. -- title width / last selected line: 0
  387. -- icon id / first selected line: 0 / 0
  388. -- text alignment: 0
  389. -- font id: 3
  390. -- text size: 9
  391. -- style flags: 0
  392. -- line height: 12
  393. -- part name: Time
  394.  
  395.  
  396. -- part 27 (button)
  397. -- low flags: 00
  398. -- high flags: 2000
  399. -- rect: left=224 top=299 right=318 bottom=244
  400. -- title width / last selected line: 0
  401. -- icon id / first selected line: 15420 / 15420
  402. -- text alignment: 1
  403. -- font id: 0
  404. -- text size: 12
  405. -- style flags: 0
  406. -- line height: 16
  407. -- part name: Prev
  408. ----- HyperTalk script -----
  409. on mouseUp
  410.   visual effect scroll right very fast
  411.   go to previous card
  412. end mouseUp
  413.  
  414.  
  415.  
  416. -- part 28 (field)
  417. -- low flags: 00
  418. -- high flags: 0000
  419. -- rect: left=288 top=55 right=73 bottom=474
  420. -- title width / last selected line: 0
  421. -- icon id / first selected line: 0 / 0
  422. -- text alignment: 0
  423. -- font id: 3
  424. -- text size: 12
  425. -- style flags: 256
  426. -- line height: 16
  427. -- part name: Topic
  428.  
  429.  
  430. -- part 29 (button)
  431. -- low flags: 00
  432. -- high flags: 2000
  433. -- rect: left=273 top=43 right=55 bottom=311
  434. -- title width / last selected line: 0
  435. -- icon id / first selected line: 0 / 0
  436. -- text alignment: 1
  437. -- font id: 0
  438. -- text size: 12
  439. -- style flags: 0
  440. -- line height: 16
  441. -- part name: TopicButton
  442. ----- HyperTalk script -----
  443. on mouseUp
  444.   if the shiftkey is up then
  445.     ask "What topic for this magazine index?"
  446.     if it is empty then exit mouseUp
  447.     put it into card field "Topic"
  448.     exit mouseUp
  449.   end if
  450.  
  451.   global myIndex1,myIndex2,errorCode,cardTotal
  452.   put NewFileName("Name of new index?","") into myIndex2
  453.   if myIndex2 is empty then exit mouseUp
  454.   set the cursor to 4
  455.   --strip off the word "stack" from the path name:
  456.   put word 2 of the long name of this stack into myIndex1
  457.   --and the cursed quotes as well:
  458.   put myIndex1 into tempIndex
  459.   put empty into myIndex1
  460.   get the length of tempIndex
  461.   put it into stringlength
  462.   repeat with count = 2 to stringlength-1
  463.     put char count of tempIndex after myIndex1
  464.   end repeat
  465.  
  466.   --now clone this file with Brad J. Hicks' copyFile XFCN
  467.   set the lockscreen to true
  468.   put copyFile (myIndex1,myIndex2) into errorCode
  469.   if it is empty then exit mouseUp
  470.   if errorCode <> 0 then
  471.     answer "Unable to copy this file" with "Oops!"
  472.     exit mouseUp
  473.   end if
  474.  
  475.   --go to the new stack and pare it down to two empty cards
  476.   go to myIndex2
  477.   put the number of cards into cardTotal
  478.   if cardTotal > 2 then
  479.     repeat with count = cardTotal down to 3
  480.       go to card count
  481.       doMenu Delete Card
  482.     end repeat
  483.   end if
  484.  
  485.   --go to the second card and empty the fields
  486.   go to card 2
  487.   repeat with count = 1 to 9
  488.     put empty into field count
  489.   end repeat
  490.   --go to first card and empty the fields
  491.   go to card 1
  492.   put empty into card field "Topic"
  493.   put empty into card field "Keyfield"
  494.   doMenu Compact Stack
  495.   visual effect dissolve to inverse
  496.   set the lockscreen to false
  497.   go to card 1
  498.  
  499. end mouseUp
  500.  
  501.  
  502.  
  503. -- part 31 (button)
  504. -- low flags: 00
  505. -- high flags: 0000
  506. -- rect: left=119 top=167 right=205 bottom=156
  507. -- title width / last selected line: 0
  508. -- icon id / first selected line: 27636 / 27636
  509. -- text alignment: 1
  510. -- font id: 0
  511. -- text size: 12
  512. -- style flags: 0
  513. -- line height: 16
  514. -- part name: Editor
  515. ----- HyperTalk script -----
  516. on mouseUp
  517.   if the commandkey is down then
  518.     set icon of target to 27636
  519.     exit mouseUp
  520.   end if
  521.  
  522.   play "boing"
  523.   set icon of target to 28603
  524.   wait 2 seconds
  525.   set icon of target to 2561
  526. end mouseUp
  527.  
  528.  
  529.  
  530. -- part 42 (button)
  531. -- low flags: 00
  532. -- high flags: 2000
  533. -- rect: left=454 top=78 right=96 bottom=472
  534. -- title width / last selected line: 0
  535. -- icon id / first selected line: 19678 / 19678
  536. -- text alignment: 1
  537. -- font id: 0
  538. -- text size: 12
  539. -- style flags: 0
  540. -- line height: 16
  541. -- part name: About
  542. ----- HyperTalk script -----
  543. on mouseUp
  544.   if visible of card field "AboutMagadex" is true then
  545.     hide card field "AboutMagadex"
  546.   else show card field "AboutMagadex"
  547.  
  548. end mouseUp
  549.  
  550.  
  551.  
  552. -- part 20 (field)
  553. -- low flags: 81
  554. -- high flags: 0004
  555. -- rect: left=22 top=33 right=296 bottom=492
  556. -- title width / last selected line: 0
  557. -- icon id / first selected line: 0 / 0
  558. -- text alignment: 0
  559. -- font id: 3
  560. -- text size: 12
  561. -- style flags: 256
  562. -- line height: 16
  563. -- part name: Help
  564. ----- HyperTalk script -----
  565. on mouseUp
  566.   set lockscreen to true
  567.   hide card button "eyehelp"
  568.   hide card button "keyhelp"
  569.   hide card button "newcardhelp"
  570.   hide card field "Help"
  571.   set lockscreen to false
  572. end mouseUp
  573.  
  574.  
  575. -- part 33 (button)
  576. -- low flags: 80
  577. -- high flags: 0000
  578. -- rect: left=37 top=171 right=195 bottom=65
  579. -- title width / last selected line: 0
  580. -- icon id / first selected line: 24294 / 24294
  581. -- text alignment: 1
  582. -- font id: 0
  583. -- text size: 12
  584. -- style flags: 0
  585. -- line height: 16
  586. -- part name: keyHelp
  587. ----- HyperTalk script -----
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594. -- part 34 (button)
  595. -- low flags: 80
  596. -- high flags: 0000
  597. -- rect: left=37 top=64 right=86 bottom=66
  598. -- title width / last selected line: 0
  599. -- icon id / first selected line: 1009 / 1009
  600. -- text alignment: 1
  601. -- font id: 0
  602. -- text size: 12
  603. -- style flags: 0
  604. -- line height: 16
  605. -- part name: eyehelp
  606. ----- HyperTalk script -----
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613. -- part 37 (button)
  614. -- low flags: 80
  615. -- high flags: 0000
  616. -- rect: left=37 top=204 right=228 bottom=66
  617. -- title width / last selected line: 0
  618. -- icon id / first selected line: 3430 / 3430
  619. -- text alignment: 1
  620. -- font id: 0
  621. -- text size: 12
  622. -- style flags: 0
  623. -- line height: 16
  624. -- part name: newcardhelp
  625. ----- HyperTalk script -----
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632. -- part 43 (field)
  633. -- low flags: 81
  634. -- high flags: 2004
  635. -- rect: left=54 top=44 right=265 bottom=443
  636. -- title width / last selected line: 0
  637. -- icon id / first selected line: 0 / 0
  638. -- text alignment: 0
  639. -- font id: 3
  640. -- text size: 12
  641. -- style flags: 256
  642. -- line height: 16
  643. -- part name: AboutMagadex
  644. ----- HyperTalk script -----
  645. on mouseUp
  646.   hide card field "AboutMagadex"
  647. end mouseUp
  648.  
  649.  
  650. -- part contents for card part 25
  651. ----- text -----
  652. Tue, Dec 13, 1988
  653.  
  654. -- part contents for card part 26
  655. ----- text -----
  656. 9:18 AM
  657.  
  658. -- part contents for card part 20
  659. ----- text -----
  660.            ‚Ä¢ Click to view titles by author or keyword.
  661.            ‚Ä¢ Command-click to view all titles.
  662.            ‚Ä¢ Option-click to do menu "find".
  663.            ‚Ä¢ Shift-click to re-view most recent search. 
  664.            Note: viewing by keyword allows for multiple
  665.            search by shift-clicking more than one keyword.
  666.            You will then have the option of searching for articles
  667.            that contain ANY selected keyword, or ALL keywords.
  668.  
  669.            ‚Ä¢ Add keywords to listing (multiple entries OK).
  670.  
  671.            ‚Ä¢ Add new card(s).  Command-click to sort cards.
  672.  
  673.    Power Tip:  When entering articles from the same magazine,
  674.    you can shift-click the word "Magazine" to duplicate the                               
  675.    last entry's Magazine, Year, Month, and Volume information.
  676.  
  677. -- part contents for card part 43
  678. ----- text -----
  679.      Magadex v1.0    Copyright ¬© 1988 by Ken Hill
  680. _________________________________________
  681. This stack is provided as "Freeware." You may use it as you like and distribute unaltered copies (for no charge) to whomever you please.
  682. _________________________________________
  683. Thanks to James Paul for the DoList XCMD, Brad J. Hicks for the Copyfile XFCN, Andrew Gilmartin for the NewFileName XFCN, Marvin Nielsen for the SortItems XFCN, and Steve Drazga for the Developer's Stack.
  684. _________________________________________
  685.          Ph: (902) 443-2025          GEnie: KHILL
  686.  
  687.  
  688.  
  689.  
  690.  
  691. -- part contents for card part 6
  692. ----- text -----
  693. Opinion
  694. Shareware